Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support direct route connection in AppGraph #7072

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Support direct route connection in AppGraph #7072

merged 5 commits into from
Jan 25, 2024

Conversation

youngbupark
Copy link

@youngbupark youngbupark commented Jan 24, 2024

Description

  • Fixed the possible nil panicking issues with to package
  • Handled http connection source without httproute
  • Refactored test code

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).
  • This pull request adds or changes features of Radius and has an approved issue (issue link required).

Fixes: #7004 #6937

@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 24, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository youngbupark/radius
Commit ref 4555e24
Unique ID f7a153d0ab
Image tag pr-f7a153d0ab
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-f7a153d0ab
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-f7a153d0ab
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-f7a153d0ab
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-f7a153d0ab
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting shared functional tests...
⌛ Starting ucp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting daprrp functional tests...
✅ samples functional tests succeeded
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ shared functional tests succeeded

@youngbupark youngbupark changed the title [WIP] Support direct route [WIP] Support direct route connection in AppGraph Jan 24, 2024
})

return entries
}

// findSourceResource finds resource id by using source string by the following criteria:
Copy link
Author

@youngbupark youngbupark Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is to support direct route scenario. The wrong connection direction bug will be fixed once this is merged.

Signed-off-by: Young Bu Park <[email protected]>
@youngbupark youngbupark changed the title [WIP] Support direct route connection in AppGraph Support direct route connection in AppGraph Jan 25, 2024
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository youngbupark/radius
Commit ref bb5fede
Unique ID 92c38c9b8c
Image tag pr-92c38c9b8c
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-92c38c9b8c
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-92c38c9b8c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-92c38c9b8c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-92c38c9b8c
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting samples functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting datastoresrp functional tests...
✅ kubernetes functional tests succeeded
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@youngbupark youngbupark marked this pull request as ready for review January 25, 2024 00:28
@youngbupark youngbupark requested review from a team as code owners January 25, 2024 00:28
{
"connections": [
{
"direction": "Inbound",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is definitely the wrong direction. Is that tracked by a separate issue?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is definitely the wrong direction. Is that tracked by a separate issue?

#7038 is the tracking issue for this bug.

"type": "Applications.Core/containers"
},
{
"connections": [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nithyatsu should the connection also appear here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IICR the data structure annotates the connection in both directions so it's easy to display.

Here's the CLI code that displays it: https://github.com/radius-project/radius/blob/main/pkg/cli/cmd/app/connections/display.go

Copy link
Author

@youngbupark youngbupark Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to connection bug. When I fixed Inbound direction bug, the connection was generated here. So this will be resolved in the following PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with that as long as it's going to be fixed soon.

// MustUnmarshalFromFile reads testdata and unmarshals it to the given type, panicking if an error occurs.
func MustUnmarshalFromFile(file string, out any) {
dec := json.NewDecoder(bytes.NewReader(ReadFixture(file)))
dec.DisallowUnknownFields()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Signed-off-by: Young Bu Park <[email protected]>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository youngbupark/radius
Commit ref 034feac
Unique ID 082daad1ea
Image tag pr-082daad1ea
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-082daad1ea
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-082daad1ea
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-082daad1ea
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-082daad1ea
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting shared functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting datastoresrp functional tests...
✅ datastoresrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@youngbupark youngbupark merged commit ba47951 into radius-project:main Jan 25, 2024
16 checks passed
@youngbupark youngbupark deleted the youngp/fix-dir-route branch January 25, 2024 18:52
@@ -497,21 +497,57 @@ func connectionsFromAPIData(resource generated.GenericResource) []*corerpv202310
data := corerpv20231001preview.ConnectionProperties{}
Copy link
Contributor

@nithyatsu nithyatsu Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the place where we are marking the dierction wrong, connection is an outbound correct?
containerA{ .. connection: { source} ...} => containerA ---> containerB as a service

willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Jan 26, 2024
# Description

* Fixed the possible nil panicking issues with `to` package
* Handled http connection source without httproute
* Refactored test code

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7004 radius-project#6937

---------

Signed-off-by: Young Bu Park <[email protected]>
sk593 pushed a commit to sk593/radius that referenced this pull request Jan 29, 2024
# Description

* Fixed the possible nil panicking issues with `to` package
* Handled http connection source without httproute
* Refactored test code

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7004 radius-project#6937

---------

Signed-off-by: Young Bu Park <[email protected]>
Signed-off-by: sk593 <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Mar 4, 2024
# Description

* Fixed the possible nil panicking issues with `to` package
* Handled http connection source without httproute
* Refactored test code

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#7004 radius-project#6937

---------

Signed-off-by: Young Bu Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic while getting application graph
3 participants